package com.shiva.oms.logview.domain;

import java.io.File;

import com.sf.shiva.oms.common.constant.CommonConstant;

/**
 * 
 * 
 * 
 * <pre>
 * HISTORY
 * ****************************************************************************
 *  ID    DATE            PERSON            REASON
 *  1     2018年4月23日         LA.01367604           Create
 * ****************************************************************************
 * </pre>
 * 
 * @author LA.01367604
 * @version 1.0
 */
public class HistoryFileRecord extends CustomTemp2Local {

    private String fileName;
    private String filePath;

    public File toFile() {
        return new File(filePath + CommonConstant.FILE_SEP + fileName);
    }
    public HistoryFileRecord(String filePath, String fileName) {
        this.fileName = fileName;
        this.filePath = filePath;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public String getFilePath() {
        return filePath;
    }

    public void setFilePath(String filePath) {
        this.filePath = filePath;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null || this.getClass() != obj.getClass())
            return false;
        return this.getFileName().equals(((HistoryFileRecord) obj).getFileName())
                && this.getFilePath().equals(((HistoryFileRecord) obj).getFilePath());
    }
}
